var playtype="";
function RefRate()
{
	$.get("xml.php?b="+page_b+"&disk="+$("#select_disk").val(),null,function(r){
		var arr=r.split(",");
		switch(arr[0])
		{
			case "0":
				for(i=1;i<=49;i++)
				{
					ChangeRate("rr0_"+i,arr[i]);
				}	
				var nameA=["rr1_1","rr1_2","rr2_1","rr2_2","rr3_1","rr3_2","rr13_1","rr13_2","rr13_3","rr20_1","rr20_2","rr28_1","rr28_2","rr47_1","rr47_2"];
				for(i=0;i<nameA.length;i++)
					ChangeRate(nameA[i],arr[50+i]);	
				break;
			case "1":
				var nameA=["rr1_1","rr1_2","rr2_1","rr2_2","rr3_1","rr3_2","rr47_1","rr47_2","rr5_1","rr5_2","rr6_1","rr6_2",
					"rr15_1_1","rr15_1_2","rr15_1_3","rr15_1_4","rr15_1_8","rr15_1_9",
					"rr15_2_1","rr15_2_2","rr15_2_3","rr15_2_4","rr15_2_8","rr15_2_9",
					"rr15_3_1","rr15_3_2","rr15_3_3","rr15_3_4","rr15_3_8","rr15_3_9",
					"rr15_4_1","rr15_4_2","rr15_4_3","rr15_4_4","rr15_4_8","rr15_4_9",
					"rr15_5_1","rr15_5_2","rr15_5_3","rr15_5_4","rr15_5_8","rr15_5_9",
					"rr15_6_1","rr15_6_2","rr15_6_3","rr15_6_4","rr15_6_8","rr15_6_9"];
				for(i=0;i<nameA.length;i++)
					ChangeRate(nameA[i],arr[i+1]);		
				break;
			case "2":
			case "3":
				for(i=1;i<=49;i++)
				{
					ChangeRate("rr0_"+i,arr[i]);
				}	
				break;
			case "4":
				for(i=1;i<=49;i++)
				{
					ChangeRate("rr0_"+i,arr[i]);
				}	
				var nameA=["rr5_1","rr5_2","rr6_1","rr6_2"];
				for(i=0;i<nameA.length;i++)
					ChangeRate(nameA[i],arr[50+i]);	
				break;
			case "6":
				var nameA=["rr15_1_1","rr15_1_2","rr15_1_3","rr15_1_4","rr15_1_5","rr15_1_6","rr15_1_7","rr15_1_8","rr15_1_9",
					"rr15_2_1","rr15_2_2","rr15_2_3","rr15_2_4","rr15_2_5","rr15_2_6","rr15_2_7","rr15_2_8","rr15_2_9",
					"rr15_3_1","rr15_3_2","rr15_3_3","rr15_3_4","rr15_3_5","rr15_3_6","rr15_3_7","rr15_3_8","rr15_3_9",
					"rr15_4_1","rr15_4_2","rr15_4_3","rr15_4_4","rr15_4_5","rr15_4_6","rr15_4_7","rr15_4_8","rr15_4_9",
					"rr15_5_1","rr15_5_2","rr15_5_3","rr15_5_4","rr15_5_5","rr15_5_6","rr15_5_7","rr15_5_8","rr15_5_9",
					"rr15_6_1","rr15_6_2","rr15_6_3","rr15_6_4","rr15_6_5","rr15_6_6","rr15_6_7","rr15_6_8","rr15_6_9"];
				for(i=0;i<nameA.length;i++)
					ChangeRate(nameA[i],arr[i+1]);	
				break;
			case "7":
				for(i=1;i<=12;i++)
				{
					ChangeRate("rr18_"+i,arr[i]);
				}
				break;
			case "8":
				for(i=1;i<=12;i++)
				{
					ChangeRate("rr21_"+i,arr[i]);
				}
				for(i=1;i<=10;i++)
				{
					ChangeRate("rr22_"+i,arr[i+12]);
				}
				break;
			case "9":
				for(i=1;i<=12;i++)
				{
					ChangeRate("rr14_"+i,arr[i]);
				}
				for(i=13;i<=17;i++)
				{
					ChangeRate("rr49_"+(i-13),arr[i]);
				}
				for(i=18;i<=29;i++)
				{
					ChangeRate("rr50_"+(i-18),arr[i]);
				}
				break;
			case "10":
				for(i=1;i<=49;i++)
				{
					ChangeRate("r29_"+i,arr[i]);
				}
				break;
		}
		
		window.setTimeout("ClearColor()",1000);
	});	
}